frac


Description

This function returns the fractional part of n, that is, the part behind the decimal dot. It will return only the decimals behind the dot of a value, so frac(3.125) will return 0.125, frac(6.921) will return 0.921, etc...


Syntax:

frac(n);


Argument Description
n The number to change.


Returns:

Real


Example:

val = frac(3.4);

This will set val to 0.4.